//-----------------------------------------------------------------------
// <copyright file="a_Articles_ImgService.cs" company="AACECOM">
//     Copyright (c) AACECOM. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

using System;
using System.Collections;
using ThoiTrang.Entities;
using ThoiTrang.Data;
    
namespace ThoiTrang.Business
{   
	/// <summary>
	/// 
	/// </summary> 
    public class a_Articles_ImgService
    {
        #region a_Articles_Img

        public static void Createa_Articles_Img(a_Articles_Img a_Articles_Img)
        {            
            try
            {
                a_Articles_ImgDAO a_Articles_ImgDAO = new a_Articles_ImgDAO();
                a_Articles_ImgDAO.Createa_Articles_Img(a_Articles_Img);
            }            
            catch (Exception ex)
            {                
                throw ex;
            }
        }        

        public static void Updatea_Articles_Img(a_Articles_Img a_Articles_Img)
        {            
            try
            {
                a_Articles_ImgDAO a_Articles_ImgDAO = new a_Articles_ImgDAO();
                a_Articles_ImgDAO.Updatea_Articles_Img(a_Articles_Img);
            }           
            catch (Exception ex)
            {
                throw ex;
            }
        }        

        public static void Deletea_Articles_Img(int iid)
        {            
            try
            {
                a_Articles_ImgDAO a_Articles_ImgDAO = new a_Articles_ImgDAO();
                a_Articles_ImgDAO.Deletea_Articles_Img(iid);
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }
        
        public static a_Articles_Img Geta_Articles_Img(int iid)
        {            
            try
            {
                a_Articles_ImgDAO a_Articles_ImgDAO = new a_Articles_ImgDAO();
                return a_Articles_ImgDAO.Geta_Articles_Img(iid);                
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }                

        public static a_Articles_ImgCollection Geta_Articles_ImgList(a_Articles_ImgColumns orderBy, OrderDirection orderDirection)
        {            
            try
            {
                a_Articles_ImgDAO a_Articles_ImgDAO = new a_Articles_ImgDAO();
                return a_Articles_ImgDAO.Geta_Articles_ImgList(orderBy, orderDirection);
            }            
            catch (Exception ex)
            {
               throw ex;
            }
        }        

        public static a_Articles_ImgCollection Geta_Articles_ImgList(a_Articles_ImgColumns orderBy, OrderDirection orderDirection, int page, int pageSize, out int totalRecords)
        {            
            try
            {
                a_Articles_ImgDAO a_Articles_ImgDAO = new a_Articles_ImgDAO();
                return a_Articles_ImgDAO.Geta_Articles_ImgList(orderBy, orderDirection, page, pageSize, out totalRecords);
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }        

        #endregion

        #region Duc them vao
        public static a_Articles_Img Geta_Articles_ImgMainByAID(int aid)
        {
            try
            {
                a_Articles_ImgDAO a_Articles_ImgDAO = new a_Articles_ImgDAO();
                return a_Articles_ImgDAO.Geta_Articles_ImgMainByAID(aid);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public static a_Articles_ImgCollection Geta_Articles_ImgListByAID(int Aid, a_Articles_ImgColumns orderBy, OrderDirection orderDirection)
        {
            try
            {
                a_Articles_ImgDAO a_Articles_ImgDAO = new a_Articles_ImgDAO();
                return a_Articles_ImgDAO.Geta_Articles_ImgListByAID(Aid, orderBy, orderDirection);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static a_Articles_ImgCollection Geta_Articles_ImgListByAID(int Aid, a_Articles_ImgColumns orderBy, OrderDirection orderDirection, int page, int pageSize, out int totalRecords)
        {
            try
            {
                a_Articles_ImgDAO a_Articles_ImgDAO = new a_Articles_ImgDAO();
                return a_Articles_ImgDAO.Geta_Articles_ImgListByAID(Aid, orderBy, orderDirection, page, pageSize, out totalRecords);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public static a_Articles_ImgCollection Geta_Articles_ImgListFav(int abId, a_Articles_ImgColumns orderBy, OrderDirection orderDirection)
        {
            try
            {
                a_Articles_ImgDAO a_Articles_ImgDAO = new a_Articles_ImgDAO();
                return a_Articles_ImgDAO.Geta_Articles_ImgListFav(abId, orderBy, orderDirection);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static a_Articles_ImgCollection Geta_Articles_ImgListFav(int abId, a_Articles_ImgColumns orderBy, OrderDirection orderDirection, int page, int pageSize, out int totalRecords)
        {
            try
            {
                a_Articles_ImgDAO a_Articles_ImgDAO = new a_Articles_ImgDAO();
                return a_Articles_ImgDAO.Geta_Articles_ImgListFav(abId, orderBy, orderDirection, page, pageSize, out totalRecords);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        #endregion


        public static void a_articleFeaturedUpload(
           string Action,
           int IID,
           int pCount1,
           string strParam1,
           string strParam2)
        {
            a_Articles_ImgDAO a_Articles_ImgDAO = new a_Articles_ImgDAO();
            a_Articles_ImgDAO.articleFeaturedUpload(Action, IID, pCount1, strParam1, strParam2);
        }
    }
}